A patch to Scintilla 1.79 containing our changes to Scintilla
(the column mode editing patch, removing unused lexers and an updated marshallers file).
diff -Naurp scintilla_orig/Editor.cxx scintilla/Editor.cxx
--- scintilla_orig/Editor.cxx	2009-06-27 08:02:37.000000000 +0200
+++ scintilla/Editor.cxx	2009-07-04 09:54:55.000000000 +0200
@@ -3509,22 +3509,51 @@ void Editor::AddChar(char ch) {
 // AddCharUTF inserts an array of bytes which may or may not be in UTF-8.
 void Editor::AddCharUTF(char *s, unsigned int len, bool treatAsDBCS) {
 	bool wasSelection = currentPos != anchor;
-	ClearSelection();
-	bool charReplaceAction = false;
-	if (inOverstrike && !wasSelection && !RangeContainsProtected(currentPos, currentPos + 1)) {
-		if (currentPos < (pdoc->Length())) {
-			if (!IsEOLChar(pdoc->CharAt(currentPos))) {
-				charReplaceAction = true;
-				pdoc->BeginUndoAction();
-				pdoc->DelChar(currentPos);
+    if(wasSelection && selType == selRectangle ) {
+        int startPos;
+        int endPos;
+
+        int c1 = pdoc->GetColumn(currentPos);
+        int c2 = pdoc->GetColumn(anchor);
+        int offset = c1 < c2 ? c1 : c2;
+
+        pdoc->BeginUndoAction();
+        SelectionLineIterator lineIterator(this, false);
+        while (lineIterator.Iterate()) {
+            startPos = lineIterator.startPos;
+            endPos   = lineIterator.endPos;
+
+            if(pdoc->GetColumn(endPos) >= offset){
+                unsigned int chars = endPos - startPos;
+                if (0 != chars) {
+                    pdoc->DeleteChars(startPos, chars);
+                }
+                pdoc->InsertString(startPos, s, len);
+            }
+        }
+        anchor += len;
+        currentPos += len;
+        SetRectangularRange();
+        pdoc->EndUndoAction();
+
+    } else {
+		ClearSelection();
+		bool charReplaceAction = false;
+		if (inOverstrike && !wasSelection && !RangeContainsProtected(currentPos, currentPos + 1)) {
+			if (currentPos < (pdoc->Length())) {
+				if (!IsEOLChar(pdoc->CharAt(currentPos))) {
+					charReplaceAction = true;
+					pdoc->BeginUndoAction();
+					pdoc->DelChar(currentPos);
+				}
 			}
 		}
-	}
-	if (pdoc->InsertString(currentPos, s, len)) {
-		SetEmptySelection(currentPos + len);
-	}
-	if (charReplaceAction) {
-		pdoc->EndUndoAction();
+		if (pdoc->InsertString(currentPos, s, len)) {
+			SetEmptySelection(currentPos + len);
+		}
+		if (charReplaceAction) {
+			pdoc->EndUndoAction();
+		}
 	}
 	// If in wrap mode rewrap current line so EnsureCaretVisible has accurate information
 	if (wrapState != eWrapNone) {
@@ -3698,14 +3727,41 @@ bool Editor::CanPaste() {
 }

 void Editor::Clear() {
-	if (currentPos == anchor) {
+    bool wasSelection = currentPos != anchor;
+    if(wasSelection && selType == selRectangle ) {
+        int startPos;
+        int endPos;
+
+        int c1 = pdoc->GetColumn(currentPos);
+        int c2 = pdoc->GetColumn(anchor);
+        int offset = c1 < c2 ? c1 : c2;
+
+        pdoc->BeginUndoAction();
+        SelectionLineIterator lineIterator(this, false);
+        while (lineIterator.Iterate()) {
+            startPos = lineIterator.startPos;
+            endPos   = lineIterator.endPos;
+
+            if(pdoc->GetColumn(endPos) >= offset){
+                unsigned int chars = endPos - startPos;
+                if (0 != chars) {
+                    pdoc->DeleteChars(startPos, chars);
+                } else
+		    pdoc->DelChar(startPos);
+            }
+        }
+        SetRectangularRange();
+        pdoc->EndUndoAction();
+
+    } else if (currentPos == anchor) {
 		if (!RangeContainsProtected(currentPos, currentPos + 1)) {
 			DelChar();
 		}
 	} else {
 		ClearSelection();
 	}
-	SetEmptySelection(currentPos);
+	if( !wasSelection )
+	    SetEmptySelection(currentPos);
 }

 void Editor::SelectAll() {
@@ -3741,7 +3797,33 @@ void Editor::DelChar() {
 }

 void Editor::DelCharBack(bool allowLineStartDeletion) {
-	if (currentPos == anchor) {
+	bool wasSelection = currentPos != anchor;
+    if(wasSelection && selType == selRectangle ) {
+        int startPos;
+        int endPos;
+
+        int c1 = pdoc->GetColumn(currentPos);
+        int c2 = pdoc->GetColumn(anchor);
+        int offset = c1 < c2 ? c1 : c2;
+
+        pdoc->BeginUndoAction();
+        SelectionLineIterator lineIterator(this, false);
+        while (lineIterator.Iterate()) {
+            startPos = lineIterator.startPos;
+            endPos   = lineIterator.endPos;
+
+            if(pdoc->GetColumn(endPos) >= offset){
+                unsigned int chars = endPos - startPos;
+                if (0 != chars) {
+                    pdoc->DeleteChars(startPos, chars);
+                } else
+		    pdoc->DelCharBack(startPos);
+            }
+        }
+        SetRectangularRange();
+        pdoc->EndUndoAction();
+
+    } else 	if (currentPos == anchor) {
 		if (!RangeContainsProtected(currentPos - 1, currentPos)) {
 			int lineCurrentPos = pdoc->LineFromPosition(currentPos);
 			if (allowLineStartDeletion || (pdoc->LineStart(lineCurrentPos) != currentPos)) {
diff -Naurp scintilla_orig/KeyWords.cxx scintilla/KeyWords.cxx
--- scintilla_orig/KeyWords.cxx	2009-05-15 12:20:26.000000000 +0200
+++ scintilla/KeyWords.cxx	2009-07-04 09:55:30.000000000 +0200
@@ -141,97 +141,35 @@ int Scintilla_LinkLexers() {

 //++Autogenerated -- run src/LexGen.py to regenerate
 //**\(\tLINK_LEXER(\*);\n\)
-	LINK_LEXER(lmAbaqus);
 	LINK_LEXER(lmAda);
-	LINK_LEXER(lmAns1);
-	LINK_LEXER(lmAPDL);
 	LINK_LEXER(lmAsm);
-	LINK_LEXER(lmASY);
-	LINK_LEXER(lmAU3);
-	LINK_LEXER(lmAVE);
-	LINK_LEXER(lmBaan);
 	LINK_LEXER(lmBash);
-	LINK_LEXER(lmBatch);
-	LINK_LEXER(lmBlitzBasic);
-	LINK_LEXER(lmBullant);
 	LINK_LEXER(lmCaml);
-	LINK_LEXER(lmClw);
-	LINK_LEXER(lmClwNoCase);
 	LINK_LEXER(lmCmake);
-	LINK_LEXER(lmCOBOL);
-	LINK_LEXER(lmConf);
 	LINK_LEXER(lmCPP);
-	LINK_LEXER(lmCPPNoCase);
-	LINK_LEXER(lmCsound);
 	LINK_LEXER(lmCss);
 	LINK_LEXER(lmD);
 	LINK_LEXER(lmDiff);
-	LINK_LEXER(lmEiffel);
-	LINK_LEXER(lmEiffelkw);
-	LINK_LEXER(lmErlang);
-	LINK_LEXER(lmErrorList);
-	LINK_LEXER(lmESCRIPT);
 	LINK_LEXER(lmF77);
-	LINK_LEXER(lmFlagShip);
-	LINK_LEXER(lmForth);
 	LINK_LEXER(lmFortran);
 	LINK_LEXER(lmFreeBasic);
-	LINK_LEXER(lmGAP);
-	LINK_LEXER(lmGui4Cli);
 	LINK_LEXER(lmHaskell);
 	LINK_LEXER(lmHTML);
-	LINK_LEXER(lmInno);
-	LINK_LEXER(lmKix);
 	LINK_LEXER(lmLatex);
-	LINK_LEXER(lmLISP);
-	LINK_LEXER(lmLot);
-	LINK_LEXER(lmLout);
 	LINK_LEXER(lmLua);
-	LINK_LEXER(lmMagikSF);
 	LINK_LEXER(lmMake);
 	LINK_LEXER(lmMatlab);
-	LINK_LEXER(lmMETAPOST);
-	LINK_LEXER(lmMMIXAL);
-	LINK_LEXER(lmMSSQL);
-	LINK_LEXER(lmMySQL);
-	LINK_LEXER(lmNimrod);
-	LINK_LEXER(lmNncrontab);
 	LINK_LEXER(lmNsis);
 	LINK_LEXER(lmNull);
-	LINK_LEXER(lmOctave);
-	LINK_LEXER(lmOpal);
 	LINK_LEXER(lmPascal);
-	LINK_LEXER(lmPB);
 	LINK_LEXER(lmPerl);
-	LINK_LEXER(lmPHPSCRIPT);
-	LINK_LEXER(lmPLM);
 	LINK_LEXER(lmPo);
-	LINK_LEXER(lmPOV);
-	LINK_LEXER(lmPowerPro);
-	LINK_LEXER(lmPowerShell);
-	LINK_LEXER(lmProgress);
 	LINK_LEXER(lmProps);
-	LINK_LEXER(lmPS);
-	LINK_LEXER(lmPureBasic);
 	LINK_LEXER(lmPython);
 	LINK_LEXER(lmR);
-	LINK_LEXER(lmREBOL);
 	LINK_LEXER(lmRuby);
-	LINK_LEXER(lmScriptol);
-	LINK_LEXER(lmSmalltalk);
-	LINK_LEXER(lmSML);
-	LINK_LEXER(lmSorc);
-	LINK_LEXER(lmSpecman);
-	LINK_LEXER(lmSpice);
 	LINK_LEXER(lmSQL);
-	LINK_LEXER(lmTACL);
-	LINK_LEXER(lmTADS3);
-	LINK_LEXER(lmTAL);
 	LINK_LEXER(lmTCL);
-	LINK_LEXER(lmTeX);
-	LINK_LEXER(lmVB);
-	LINK_LEXER(lmVBScript);
-	LINK_LEXER(lmVerilog);
 	LINK_LEXER(lmVHDL);
 	LINK_LEXER(lmXML);
 	LINK_LEXER(lmYAML);
diff -Naurp scintilla_orig/scintilla-marshal.c scintilla/scintilla-marshal.c
--- scintilla_orig/scintilla-marshal.c	2004-04-04 11:59:37.000000000 +0200
+++ scintilla/scintilla-marshal.c	2009-06-21 23:17:08.000000000 +0200
@@ -35,8 +35,8 @@
 #define g_marshal_value_peek_ulong(v)    (v)->data[0].v_ulong
 #define g_marshal_value_peek_int64(v)    (v)->data[0].v_int64
 #define g_marshal_value_peek_uint64(v)   (v)->data[0].v_uint64
-#define g_marshal_value_peek_enum(v)     (v)->data[0].v_int
-#define g_marshal_value_peek_flags(v)    (v)->data[0].v_uint
+#define g_marshal_value_peek_enum(v)     (v)->data[0].v_long
+#define g_marshal_value_peek_flags(v)    (v)->data[0].v_ulong
 #define g_marshal_value_peek_float(v)    (v)->data[0].v_float
 #define g_marshal_value_peek_double(v)   (v)->data[0].v_double
 #define g_marshal_value_peek_string(v)   (v)->data[0].v_pointer
@@ -50,10 +50,10 @@
 /* NONE:INT,POINTER (scintilla-marshal.list:1) */
 void
 scintilla_marshal_VOID__INT_POINTER (GClosure     *closure,
-                                     GValue       *return_value,
+                                     GValue       *return_value G_GNUC_UNUSED,
                                      guint         n_param_values,
                                      const GValue *param_values,
-                                     gpointer      invocation_hint,
+                                     gpointer      invocation_hint G_GNUC_UNUSED,
                                      gpointer      marshal_data)
 {
   typedef void (*GMarshalFunc_VOID__INT_POINTER) (gpointer     data1,
